package com.tensquare.base;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

/**
 * Base 启动类.
 *
 * @author 宫新程
 * @since 2019/3/2 9:59
 */
@SpringBootApplication
@EnableEurekaClient
public class BaseApplication {

  public static void main(String[] args) {
    SpringApplication.run(BaseApplication.class, args);
  }

  /** id生成器. */
  @Bean
  public IdWorker idWorker() {
    return new IdWorker(1, 1);
  }
}
